<%@ page import="com.lihuanyu.upcOA.conn.databaseUtil" %>
<%--
  Created by IntelliJ IDEA.
  User: skyADMIN
  Date: 15/9/3
  Time: 下午4:31
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
  int flag = 0;
  int uid = Integer.parseInt(String.valueOf(session.getAttribute("tid")));
  request.setCharacterEncoding("utf-8");
  String name = request.getParameter("name") == null ? "" : new String(request.getParameter("name"));
  String sex = request.getParameter("sex") == null ? "" : new String(request.getParameter("sex"));
  String stuid = request.getParameter("stuid") == null ? "" : new String(request.getParameter("stuid"));
  String major = request.getParameter("major") == null ? "" : new String(request.getParameter("major"));
  String classname = request.getParameter("class") == null ? "" : new String(request.getParameter("class"));
  String email = request.getParameter("email") == null ? "" : new String(request.getParameter("email"));
  String phone = request.getParameter("phone") == null ? "" : new String(request.getParameter("phone"));
  String QQ = request.getParameter("qq") == null ? "" : new String(request.getParameter("qq"));
  databaseUtil db = new databaseUtil();
  String sql = "update teacher_info set name='" + name + "',sex='" + sex + "',teaid='" + stuid + "',major='" + major + "',workyear='" + classname + "',qq='" + QQ + "',phonenum='" + phone + "',email='" + email + "' where uid="+uid;
  //System.out.print(sql);
  db.executeUpdate(sql);
  out.print("true");
  db.sqlclose();
%>
